//
//  NSTimer+HKExtension.m
//  HKUtilities
//
//  Created by 胡锦涛 on 2018/11/12.
//  Copyright © 2018 胡锦涛. All rights reserved.
//

#import "NSTimer+HKExtension.h"

@implementation NSTimer (HKExtension)

-(void)pauseTimer
{
    if (![self isValid]) {
        return ;
    }
    [self setFireDate:[NSDate distantFuture]];
}


-(void)resumeTimer
{
    if (![self isValid]) {
        return ;
    }
    [self setFireDate:[NSDate date]];
}

- (void)resumeTimerAfterTimeInterval:(NSTimeInterval)interval
{
    if (![self isValid]) {
        return ;
    }
    [self setFireDate:[NSDate dateWithTimeIntervalSinceNow:interval]];
}


@end
